package com.cskaoyan._01btyestream.buffer;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/17 17:32
 **/

public class Demo2 {
    public static void main(String[] args) throws IOException {
        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("a.txt"));

        out.write("abcd".getBytes());

        // flush
        out.flush();
        // close 会执行flush操作

        out.close();
    }
}
